﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="WebFormPurchase.aspx.cs" Inherits="OnlineReservation.WebFormPurchase" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder" runat="server">
    <div id="DivPurchase" runat="server">
        Event: <asp:Label ID="LabelEventName" runat="server"></asp:Label> <br />
        Ticket price: <asp:Label ID="LabelTicketPrice" runat="server"></asp:Label> <br />
        Enter your full name: <asp:TextBox ID="TextBoxFullName" 
            runat="server" Width="273px"></asp:TextBox>
        <asp:RequiredFieldValidator ErrorMessage="Enter full name" ControlToValidate="TextBoxFullName"
            runat="server" ForeColor="Red" ValidationGroup="Buy" /> <br />
        Enter number of tickets: <asp:TextBox ID="TextBoxTicketsNumber" runat="server"></asp:TextBox>
        <asp:RequiredFieldValidator ErrorMessage="Enter number of tickets to buy" ControlToValidate="TextBoxTicketsNumber"
            runat="server" ForeColor="Red" ValidationGroup="Buy" /> <br />
        <asp:RangeValidator ErrorMessage="Enter positive number" ControlToValidate="TextBoxTicketsNumber"
            runat="server" MinimumValue="1" MaximumValue="99" 
            Type="Integer" ForeColor="Red" ValidationGroup="Buy"/> <br />
        Shipping address: <br />
        <asp:TextBox ID="TextBoxShippingAddress" runat="server" TextMode="MultiLine"></asp:TextBox> 
        <asp:RequiredFieldValidator ErrorMessage="Enter address to ship" ControlToValidate="TextBoxShippingAddress"
            runat="server" ForeColor="Red" ValidationGroup="Buy"/> <br />
        <asp:Button ID="ButtonBuy" runat="server" Text="Buy" 
            onclick="ButtonBuy_Click" /> 
        <asp:Button ID="ButtonBack" runat="server" Text="Back" 
            onclick="ButtonBack_Click" />
    </div>
    <div id="DivPurchased" runat="server">
        Your puchase number is: # <asp:Label ID="LabelPurchaseNumber" runat="server"></asp:Label> write it down! <br />
        <asp:Button ID="OK" runat="server" onclick="OK_Click" Text="OK"/>
    </div>
</asp:Content>
